import 'package:flutter/material.dart';
import 'package:statsfl/statsfl.dart';
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import 'dart:io';
import 'config/initialize_providers.dart';
import 'package:get/get.dart';
import 'config/configPages.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';


void main() {
  runApp(
    StatsFl(
        //监听性能
        isEnabled: true,
        align: Alignment.topRight,
        child: GetMaterialApp(
          home: MultiProvider(providers: blocs, child: const MyApp()),
        )),
  );
  if (Platform.isAndroid) {
    //设置Android头部的导航栏透明
    SystemUiOverlayStyle systemUiOverlayStyle = const SystemUiOverlayStyle(statusBarColor: Colors.transparent);
    SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
  }
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return FlutterEasyLoading(
      child: LDXHomeBody(),
    );
  }
}